﻿using Lanbt.Core.Entity.Enums;

namespace Lanbt.Core.Entity.EntityDB
{
    /// <summary>
    /// 权限
    /// </summary>
    public class lanbt_power:EntityBase
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 菜单编码，用于后端权限控制
        /// </summary>
        public string? MenuCode { get; set; }

        /// <summary>
        /// 菜单父节点ID，方便递归遍历菜单
        /// </summary>
        public int ParentID { get; set; }

        /// <summary>
        /// 节点类型，可以是文件夹、页面或者按钮类型
        /// </summary>
        public PowerType PowerType { get; set; }

        /// <summary>
        /// 是否显示菜单
        /// </summary>
        public bool IsMenuShow { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 图标URL
        /// </summary>
        public string? IconUrl { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 页面对应的地址，如果是文件夹或者按钮类型，可以为空
        /// </summary>
        public string? LineUrl { get; set; }

        /// <summary>
        /// 菜单树的层次，以便于查询指定层级的菜单
        /// </summary>
        public int Level { get; set; }

        /// <summary>
        /// 树id的路径，主要用于存放从根节点到当前树的父节点的路径，逗号分隔，想要找父节点会特别快
        /// </summary>
        public string? Path { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        [SqlSugar.SugarColumn(Length = 2000)]
        public string? Descript { get; set; }
    }
}
